//
//  CHSingleChioseView.h
//  CHOCTool
//
//  Created by cyptt on 2020/9/13.
//  Copyright © 2020 com.qingtiantree. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface CHSingleChioseView : UIView
@property(nonatomic,strong)NSArray * titleArr;

@property(nonatomic,strong)UIColor * defaultColor;   //正常颜色
@property(nonatomic,strong)UIColor * selectedColor;   //选中颜色

@property(nonatomic,strong)UIColor * lineColor; //线颜色
@property(nonatomic,assign)CGFloat lineWith;  //线高  lineWith = 0 适配字体宽度
@property(nonatomic,assign)CGFloat lineH;  //线宽度
@property(nonatomic,strong)UIFont * titleFont; //字体
@property(nonatomic,assign)BOOL  islineBorder; //是否圆角 默认圆角
//@property(nonatomic,assign)CGFloat fontSize; //字体大小

//@property(nonatomic,assign)BOOL isEqualPart; //是否边距等分默认等分
//@property(nonatomic,assign)CGFloat  marginLefRightW; //距离左右边距，如果不传则为等分

-(void)setTitleArr:(NSArray *)titleArr defaultColor:(nullable UIColor *)defaultColor selectedColor:(nullable UIColor *)selectedColor lineColor:(nullable UIColor *)lineColor;


/**
 隐藏下划线
 */
-(void)hideLineView;

/*
 点击了按钮回调
 */
-(void)btnClickBlockFun:(void (^)(NSString * title ))btnClickBlock;

@property(nonatomic,strong)void(^btnClickBlock)(NSString * title);

/*
 点击了按钮回调保护位置
 */
-(void)btnClickIndexBlockFun:(void (^)(NSString * title,int index))btnClickBlock;

@property(nonatomic,strong)void(^btnClickIndexBlock)(NSString * title,int index);

/*
 设置按钮位置
 */
-(void)setIndex:(int)index;
@end

NS_ASSUME_NONNULL_END
